<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!--
      If you are serving your web app in a path other than the root, change the
      href value below to reflect the base path you are serving from.

      The path provided below has to start and end with a slash "/" in order for
      it to work correctly.

      For more details:
      * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
    -->
    <base href="/kjjf/jiaofeiApp/detail/">

    <meta charset="UTF-8">
    <meta content="IE=Edge" http-equiv="X-UA-Compatible">
    <meta name="description" content="A new Flutter project.">

    <!-- iOS meta tags & icons -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="康居缴费">
    <link rel="apple-touch-icon" href="icons/Icon-192.png">
    <link rel="stylesheet" type="text/css" th:href="@{/styles.css}">
    <title>康居缴费</title>
    <link rel="manifest" href="manifest.json">
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js" charset="utf-8" ></script>
    <script th:src="@{/wxPay.js}" type="application/javascript"></script>

</head>
<body>
<div class="center">
    <div class="sk-chase">
        <div class="sk-chase-dot"></div>
        <div class="sk-chase-dot"></div>
        <div class="sk-chase-dot"></div>
        <div class="sk-chase-dot"></div>
        <div class="sk-chase-dot"></div>
        <div class="sk-chase-dot"></div>
    </div>
</div>

<div id="contractNo" th:value="${contractNo}" hidden></div>
<div id="houseId" th:value="${houseId}" hidden></div>
<div id="openid" th:value="${openid}" hidden></div>
<!-- This script installs service_worker.js to provide PWA functionality to
     application. For more information, see:
     https://developers.google.com/web/fundamentals/primers/service-workers -->
<!--      var v = [[${phone}]];-->
<!--var v = "13957718741";-->
<script type="text/javascript">
    window.flutterWebRenderer = "html";
    var contractNo = document.getElementById("contractNo").getAttribute("value");
    var openid = document.getElementById("openid").getAttribute("value");
    var houseId = document.getElementById("houseId").getAttribute("value");
    if (typeof(Storage) !== "undefined") {
        if (typeof(contractNo) !== "undefined") {
            console.log("333");
            localStorage.kjjfcontractNo=contractNo;
            localStorage.kjjfOpenid=openid;
            localStorage.kjjfhouseId=houseId;
            // 针对 localStorage/sessionStorage 的代码
        } else {
            if (typeof(localStorage.getItem("kjjfcontractNo")) !== "undefined"){
                contractNo = localStorage.kjjfcontractNo;
                openid = localStorage.kjjfOpenid;
                houseId = localStorage.kjjfhouseId;
            }else{
                contractNo = "";
                openid = "";
                houseId = "";
            }
            // 抱歉！不支持 Web Storage ..
        }

        // 针对 localStorage/sessionStorage 的代码
    } else {
        // 抱歉！不支持 Web Storage ..
    }
    function getContractNo() {
        return contractNo;
    }

    function getOpenid() {
        return openid;
    }

    function getHouseId() {
        return houseId;
    }

    function reloadF(){
        let urlA = location.href.indexOf('contractNo=');
        // let urlB = location.href.indexOf('ver=')
        if(urlA != "-1"){
            window.location.href = "https://kangju.0577tx.com/api/wechat/auth?contractNo="+contractNo+"&houseId="+houseId;
            console.log("这是url参数包含a执行");
        }
    }
</script>



<script th:src="@{/mainto10.dart.js}" type="application/javascript"></script>
</body>
</html>
